import request from '@/utils/request'
// 类目-列表
export function getList(data) {
  return request({
    url: 'category/list',
    method: 'get',
    params: data
  })
}
// 类目-增
export function getAdd(data) {
  return request({
    url: 'category/',
    method: 'post',
    data
  })
}
// 类目-删
export function del(ids) {
  return request({
    url: 'category',
    method: 'delete',
    data: ids
  })
}
// 类目-改
export function getUpdate(data) {
  return request({
    url: 'category',
    method: 'put',
    data
  })
}
// 类目-详情
export function getDetail(id) {
  return request({
    url: 'category/' +id,
    method: 'get',
  })
}
export function getTree(data) {
  return request({
    url: 'category/getTree/',
    method: 'get',
    params: data
  })
}
//类目-树形
export default { getAdd, getUpdate, del, getList, getDetail, getTree}